import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import "./utils/eventbus"
import VueAwesomeSwiper from 'vue-awesome-swiper'
import './plugins/element.js'
import './assets/css/reset.css'
import 'swiper/css/swiper.css'
import BackTop from './components/backTop'
import jwt from 'jwt-decode'



if (localStorage.getItem("wedding")) {
  store.commit("LoginModule/setUser", {
    username: jwt(localStorage.getItem("wedding")).username,
    token: localStorage.getItem("wedding")
  })

  store.commit("isShow/setIsShow", false)



}



Vue.config.productionTip = false
Vue.use(VueAwesomeSwiper)
Vue.use(BackTop)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

